﻿using Microsoft.TeamFoundation.Build.Client;
using Microsoft.TeamFoundation.Client;

namespace TFSMailer.Classes
{
    public class Build  
    {

        public IBuildDefinition[] GetBuildDefinitions(string projectName, TeamFoundationServer tfs)
        {
            IBuildServer bs = (IBuildServer)tfs.GetService(typeof(IBuildServer));
            IBuildDefinition[] buildDefinitions = bs.QueryBuildDefinitions(projectName);
            return buildDefinitions;
        }
    }
}
